Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support html in github markdown plugin #5031

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Conversation

alpetric
Copy link
Contributor

@alpetric alpetric commented Jan 8, 2025

e.g

## Hello world
lorem ipsom
<div class="border-l-4 border-blue-500 bg-blue-100 p-4 rounded">
  <strong class="text-blue-700">Note:</strong> Hello
</div>
Screenshot 2025-01-08 at 10 42 45 AM

Important

Adds HTML support in GitHub-flavored markdown with rehype-raw in GfmMarkdown.svelte and updates styling for GitHub alerts.

  • Behavior:
    • Adds support for HTML in GitHub-flavored markdown by integrating rehype-raw plugin in GfmMarkdown.svelte.
    • HTML content within markdown is now rendered correctly.
  • Dependencies:
    • Adds rehype-raw version ^7.0.0 and rehype-github-alerts version ^3.0.0 to package.json.
  • Styling:
    • Adds CSS for GitHub alert types in GfmMarkdown.svelte, including color variables for different alert types.

This description was created by Ellipsis for 28dc881. It will automatically update as commits are pushed.

@alpetric alpetric requested a review from rubenfiszel as a code owner January 8, 2025 15:48
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to f1c4d2d in 17 seconds

More details
  • Looked at 34 lines of code in 2 files
  • Skipped 1 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/lib/components/GfmMarkdown.svelte:4
  • Draft comment:
    Using rehypeRaw to parse raw HTML can introduce security risks such as XSS. Ensure that the markdown content is sanitized before rendering.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_SPbHLQjNfQnsrG60


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

cloudflare-workers-and-pages bot commented Jan 8, 2025

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 88f7538
Status: ✅  Deploy successful!
Preview URL: https://8400d5bd.windmill.pages.dev
Branch Preview URL: https://alp-support-html-in-gfm.windmill.pages.dev

View logs

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 28dc881 in 26 seconds

More details
  • Looked at 130 lines of code in 2 files
  • Skipped 1 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/lib/components/GfmMarkdown.svelte:5
  • Draft comment:
	import rehypeGithubAlerts from 'rehype-github-alerts'
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_ZQ52yG6zPhGy2eqL


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@alpetric
Copy link
Contributor Author

alpetric commented Jan 8, 2025

also supports github [!TIP] ... etc. syntax

Tip

example :)

@rubenfiszel rubenfiszel merged commit 53c62f2 into main Jan 9, 2025
3 checks passed
@rubenfiszel rubenfiszel deleted the alp/support_html_in_gfm branch January 9, 2025 05:40
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants